package com.wnxy.producer.e_rpc;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ClientProducer {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMsg(String exchange,String routingKey,String msg) {
        Object serverReturn = rabbitTemplate.convertSendAndReceive(exchange, routingKey, msg);

        System.out.println("serverReturn = " + serverReturn);
    }
}